<template>
  <div class="child">
     <h1>我是子组件1，我也可以获得父组件的provide：{{lalal}} </h1>
     <GrandChild></GrandChild>
  </div>
</template>

<script setup lang="ts">
import { provide, inject, ref } from 'vue';
import GrandChild from './GrandChild.vue';

let test = ref(123);
provide("test", 123);
let lalal = inject('TOKEN');


</script>

<style scoped>
.child{
  width: 300px;
  height: 400px;
  background: yellowgreen;
}
</style>